home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / ch06_med / txtchngr / txtchngr.dcr / 00004_text futz.ls < prev    next >
Encoding:
Text File  |  1996-12-06  |  2.5 KB  |  84 lines

  1. on morphHeight theField, destTH
  2.   global gRealTH, gRealTHList
  3.   set gRealTH to getProp(gRealTHList, "#" & theField)
  4.   if not gRealTH then
  5.     set gRealTH to the textHeight of field theField
  6.   end if
  7.   set startTH to gRealTH
  8.   if destTH > startTH then
  9.     repeat with i = startTH to destTH
  10.       set the textHeight of field theField to i
  11.       updateStage()
  12.     end repeat
  13.   else
  14.     repeat with i = startTH down to destTH
  15.       set the textHeight of field theField to i
  16.       updateStage()
  17.     end repeat
  18.   end if
  19.   set gRealTH to destTH
  20.   setProp(gRealTHList, "#" & theField, gRealTH)
  21. end
  22.  
  23. on changeTextColor theField, theTextScope, theColors
  24.   if theTextScope <> EMPTY then
  25.     set theTextScope to theTextScope && "of"
  26.   end if
  27.   if listp(theColors) then
  28.     repeat with i in theColors
  29.       do("set the foreColor of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & i)
  30.       updateStage()
  31.       waitForTicks(10)
  32.     end repeat
  33.   else
  34.     do("set the foreColor of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & theColors)
  35.     updateStage()
  36.   end if
  37. end
  38.  
  39. on changeTextFont theField, theTextScope, theFont
  40.   if theTextScope <> EMPTY then
  41.     set theTextScope to theTextScope && "of"
  42.   end if
  43.   if listp(theFont) then
  44.     repeat with i in theFont
  45.       do("set the textFont of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & QUOTE & i & QUOTE)
  46.       updateStage()
  47.     end repeat
  48.   else
  49.     do("set the textFont of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & QUOTE & theFont & QUOTE)
  50.     updateStage()
  51.   end if
  52. end
  53.  
  54. on changeTextSize theField, theTextScope, theSize
  55.   if theTextScope <> EMPTY then
  56.     set theTextScope to theTextScope && "of"
  57.   end if
  58.   if listp(theSize) then
  59.     repeat with i in theSize
  60.       do("set the textSize of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & i)
  61.       morphHeight(theField, 24)
  62.       updateStage()
  63.     end repeat
  64.   else
  65.     do("set the textSize of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & theSize)
  66.     morphHeight(theField, 24)
  67.   end if
  68. end
  69.  
  70. on changeTextStyle theField, theTextScope, theStyle
  71.   if theTextScope <> EMPTY then
  72.     set theTextScope to theTextScope && "of"
  73.   end if
  74.   if listp(theStyle) then
  75.     repeat with i in theStyle
  76.       do("set the textStyle of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & QUOTE & i & QUOTE)
  77.       updateStage()
  78.     end repeat
  79.   else
  80.     do("set the textStyle of " & theTextScope & " field " & QUOTE & theField & QUOTE & " to " & QUOTE & theStyle & QUOTE)
  81.     updateStage()
  82.   end if
  83. end
  84.